The invention is directed to client/server computing systems.
A client/server computing system may include a client computer that communicates with a server computer over a network. In such a system, a client process (i.e., a process running on the client computer) causes a server process (i.e., a process running on the server computer) to perform an operation by sending a request to the server process over the network. The server process responds by performing the operation and returning any resulting data to the client process over the network.
Exchanges of requests and responses between the client and the server may be made using the Remote Procedure Call ("RPC") protocol. The RPC protocol is discussed, for example, in "Microsoft RPC Programming Guide", John Shirley and Ward Rosenberry, O'Reilly & Associates, Inc., Sebastopol, Calif., 1995, which is incorporated herein by reference.
The RPC protocol permits the client process to communicate with the server process by making a procedure call to the server process. RPC software running on the client computer automatically transmits the procedure call to the server computer. RPC software running on the server computer receives the procedure call and initiates a response by the server process. The RPC software then returns the results to the client computer.
Concepts defined by the RPC protocol include interfaces, endpoints, and binding handles. An interface is a description of the applications programming interfaces ("APIs") supported by a server application. A given application may have many interfaces that are accessed independently.
Each instantiation, or copy, of an interface is called an endpoint. The endpoint describes a communications port that a client process may use to communicate with the server. Viewed simply, an endpoint is an address at which a client may access the particular copy of an interface. An endpoint designates the name or address of the interface, the server on which the interface is located, and the communications protocol, or transport, by which the interface is to be addressed. For example, the endpoint designated by "ncacn.sub.-- np:.backslash..backslash..backslash..backslash.DINO.backslash.pipe.backsl ash.lsasrv!" describes a process that uses the named pipe protocol (as indicated by "ncacn.sub.-- np"), is located on the server "DINO", and is named ".backslash.pipe.backslash.lsasrv". Similarly, the endpoint designated by "ncacn.sub.-- ip.sub.-- tcp:157.55.23.481029!" describes a process that uses the TCP/IP transport (as indicated by "ncacn.sub.-- ip.sub.-- tcp") and is located at port "1029" of a server having the address "157.55.23.48".
A client process connects to a specific endpoint using a binding handle. As noted above, an endpoint may be viewed as providing an address at which a desired server process is located. A binding handle may be viewed as pointing to that address. More specifically, a binding handle designates a communication protocol sequence (i.e., the transport by which the endpoint is to be addressed), a server name or address for the corresponding endpoint, and a server process name or address for the corresponding endpoint.
In general, binding handles and endpoints may be fully or partially bound. A fully-bound handle (or a fully-bound endpoint) is one that completely describes the path to the server application. A server application that produces fully-bound endpoints defines a separate endpoint for each transport supported by the server application. A large number of transports (i.e., 20 or more) may be available on a given machine. Accordingly, the burden of defining an endpoint for every possible transport soon can become onerous. In addition, consideration must be given to guaranteeing that a chosen endpoint does not conflict with an existing endpoint for a different application or for a different instance of the same application.
To ease this burden, the RPC protocol permits a server process to define partially-bound endpoints. A client process may then communicate with the server process using a partially-bound handle and the partially-bound endpoint of the server process. A partially-bound endpoint may include the server name or address and the name or address of the server process, without including information about a particular transport to be employed. A partially-bound handle may include the same information, or may include only the server process name or address. A partially-bound handle that includes only the name of the server process might be used when the same server process is running on multiple, equally acceptable, servers.
The RPC software includes an endpoint mapper that enables the use of partially-bound handles and partially-bound endpoints. Each server process using the RPC protocol registers partially-bound endpoints with the endpoint mapper. When a client process wishes to communicate with a given server process, the client process provides the endpoint mapper with an appropriate partially-bound handle. The endpoint mapper responds by producing a fully-bound endpoint for a server process that has registered a partially-bound endpoint corresponding to the partially-bound handle. The endpoint mapper then provides the fully-bound endpoint to the client process. The client process produces a fully-bound handle using this fully-bound endpoint and connects to the server process using the fully-bound handle.